/**
 * @author robin
 * @file axios
 * @date 2018-09-26 10:51
 */

import axios from "axios";
import axiosOptions from "../config";

const httpClient = axios.create(axiosOptions.httpApiSettings);

/*httpClient.interceptors.response.use(
  (error: any) => {
    if (error && error.response) {
      if (error.response.status === 401) {
        window.location.href = "/login";
      }
    }
    return Promise.reject(error);
  },
);*/

export default httpClient;

export const httpCommonClient = axios.create(axiosOptions.httpCommonSettings);
